﻿using System;

public partial class Admin_View : HocLapTrinhWeb.UI.PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        switch (Action)
        {
            case "atms":
                Page.Title = "Tin tức | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucAtm.ascx"));
                break;
            case "atmdetail":
                Page.Title = "Chi tiết tin tức | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucAtmDetail.ascx"));
                break;
            case "province":
                Page.Title = "Quản lý khu vực | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucProvince.ascx"));
                break;
            case "atmtype":
                Page.Title = "Tag | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucAtmType.ascx"));
                break;
            case "updatenews":
                Page.Title = "Lấy tin tự động | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucUpdateNews.ascx"));
                break;
            case "video":
                Page.Title = "Video | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucVideo.ascx"));
                break;
            case "videotype":
                Page.Title = "Loại video | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucVideoType.ascx"));
                break;
            case "videodetail":
                Page.Title = "Chi tiết video | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucVideoDetail.ascx"));
                break;
            case "contact":
                Page.Title = "Quản lý liên hệ | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucContact.ascx"));
                break;
            case "commentnew":
                Page.Title = "Bình luận tin tức | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucCommentNews.ascx"));
                break;
            case "user":
                Page.Title = "Quản lý thành viên | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucUser.ascx"));
                break;
            case "autoadv":
                Page.Title = "Quản lý quảng cáo - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucAutoAdv.ascx"));
                break;
            case "seoconfig":
                Page.Title = "Cấu hình Seoconfig - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucSeoConfig.ascx"));
                break;
            case "alexa":
                Page.Title = "Quản lý alexa - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucAlexa.ascx"));
                break;
            case "alexadetail":
                Page.Title = "Chi tiết alexa - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucAlexaDetail.ascx"));
                break;
            case "role":
                Page.Title = "Quản lý Role - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucRole.ascx"));
                break;
            case "permission":
                Page.Title = "Quản lý Permission - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucPermission.ascx"));
                break;
            case "userpermission":
                Page.Title = "Quản lý UserPermission - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucUserPermission.ascx"));
                break;
            case "changepassword":
                Page.Title = "Thay đổi mật khẩu - Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucChangePassword.ascx"));
                break;
            default:
                Page.Title = "Bảng điều khiển | Atm VietComBank";
                pCenter.Controls.Add(Page.LoadControl("~/Admin/usercontrols/ucDefault.ascx"));
                break;
        }
    }

    private string Action
    {
        get
        {
            return string.IsNullOrEmpty(Request.QueryString["action"]) ? "default" : Request.QueryString["action"];
        }
    }
}